<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <style>

    </style>
</head>

<body>
    <div id="app">
        <comp1>
            <button slot="btn">按钮</button>
            <a href="#" slot="link">这是a标签</a>
        </comp1>
    </div>

    <template id="temp1">
        <div>
            <slot name="btn"></slot>
            <h1>标题标签h1</h1>
            <slot name="link"></slot>
        </div>
    </template>


    <script>
        let comp1 = {
            template: '#temp1'
        }
        new Vue({
            el: "#app",
            data: {

            },
            components: {
                comp1,
            },
        })

    </script>
</body>

</html>